<!DOCTYPE html>
<html lang="zh-Hans">
  <head>
    <meta charset="UTF-8" />
    <title>画一个冰墩墩</title>
    <meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1.0,  maximum-scale=1.0,minimum-scale=1.0" />
    <link rel="stylesheet" href="prism/prism.css">
    <script src="prism/prism.js"></script>
    <style id="styleTag"></style>
    <style>
        body{
            display:flex;
            height: 100vh;
            position: relative;
        }
        
        .code-wrapper{
            flex:1;
            padding: 2px 10px;
        }
        #code{
            overflow: hidden;
            height: 95vh;
        }
        /*隐藏滚动条*/
        #code::-webkit-scrollbar {
            display: none;
        }
        
        .preview-wrapper{
            flex:2;
        }
        .preview {
            height: 100%;
            display: flex;
        }
        .wrapper {
            width: 100%;
            height:165px;
            position: relative;  
        }
        
        #buttons{
            position: fixed;
            bottom: 20px;
            right: 20px;
            display: flex;
            flex-direction: column;
            z-index: 2;
        }
        #buttons button{
            padding: 8px 26px;
            margin-bottom: 10px;
            border-radius: 8px;
            border: none;
            outline: none;
            cursor: pointer;
            background-color: #ecf5ff;
            color: #409eff;
        }
        #buttons button:hover{
            background-color: #409eff;
            color: #fff;
        }
        @media screen and (max-width: 500px) {
            body{
                flex-direction: column;
            }
            .code-wrapper{
                height:45vh;
                padding: 10px;
            }
            #code{
                height: 90%;
            }
            .preview-wrapper{
                flex:1;
                height:50vh;
            }
            .wrapper {
                transform:scale(0.4);
                margin-left: -60px;
            }
            #buttons button{
                padding: 5px;
            }
        }
    </style>
  </head>
  
  <body>
    <div class="code-wrapper">
        <pre id="code" class="language-css"></pre>
    </div>
        <div class="preview-wrapper">
        <div class="preview">
            <div class="wrapper">
                <div class="m_body"></div>
                <div class="ear1"></div>
                <div class="ear2"></div>
                <div class="eye1"></div>
                <div class="eye2"></div>
                <div class="face c_blue"></div>
                <div class="face c_red"></div>
                <div class="face c_purple"></div>
                <div class="face c_yellow"></div>
                <div class="face c_green"></div>
                <div class="nose"></div>
                <div class="mouse"></div>
                <div class="arm1"></div>
                <div class="arm2"></div>
                <div class="leg1"></div>
                <div class="leg2"></div>
            </div>
        </div>
    </div>
    <div id="buttons">
        <button id="btnPlay" style="display:none">播放</button>
        <button id="btnPause">暂停</button>
        <button id="btnSlow">慢速</button>
        <button id="btnNormal">中速</button>
        <button id="btnFast">快速</button>
    </div>
  </body>

  <script src="main.js"></script>
</html>
